<template>
  <div id="avatar">
    <el-dropdown>
      <img src="@/assets/avatar.webp" alt="" class="avatar-img">
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item>个人中心</el-dropdown-item>
          <el-dropdown-item>首页</el-dropdown-item>
          <el-dropdown-item divided>退出登录</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'
  export default defineComponent({
    name: "avatar"
  })
</script>

<style scoped lang="less">
  #avatar {
    height: 50px;
    width: 50px;
    display: flex;
    align-items: center;
    .avatar-img {
      height: 40px;
      width: 40px;
      border-radius: 5px;
    }
  }
</style>
